<?php slot_begin('custom_header'); ?>
	<meta http-equiv="refresh" content="60; URL=<?php echo $_SERVER['REQUEST_URI'];?>" />
<?php slot_end('custom_header');?>

<ul class="menu clear">
	<li<?php if (!isset($_REQUEST['recent'])) echo ' class="active"';?>><a href="/">Home</a></li>
	<li<?php if (isset($_REQUEST['recent'])) echo ' class="active"';?>><a href="/index?recent">Recently</a></li>
</ul>
		
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="GET" id="frmUser">
<div class="cmdbar">
	<?php if (isset($recent)):?>
	<input type="hidden" name="recent" />
	<?php endif?>
	<label>User: </label>
	<select name="u" onchange="onChangeUser()">
		<option value="">--- all ---</option>
		<?php foreach ($users as $u):?>
			<option value="<?php echo $u['id']?>"<?php if ($userId == $u['id']) echo ' selected';?>><?php echo $u['name']?></option>
		<?php endforeach;?>
	</select>
	<input type="submit" value="filter" />
</div>
</form>
<?php echo $this->renderElement('list.tpl.php', Array('data' => $data));?>

<script type="text/javascript">
	function onChangeUser() {
		$('#frmUser').submit();
	}
</script>